{% block login_nav %}
<ul class="nav navbar-top-links navbar-right">

    <!-- /.dropdown -->
    <li class="dropdown">
        <a class="dropdown-toggle" data-toggle="dropdown" href="#">
            <i class="fa fa-user fa-fw"></i> <i class="fa fa-caret-down"></i>
        </a>
        {% if request.user.is_authenticated %}
        <ul class="dropdown-menu dropdown-user">
            <li><a href="#"><i class="fa fa-user fa-fw"></i>{{ request.user }}</a>
            </li>
            <li><a href="/account/password_change"><i class="fa fa-gear fa-fw"></i>修改密码</a>
            </li>
            <li class="divider"></li>
            <li><a href="/account/logout"><i class="fa fa-sign-out fa-fw"></i>退出</a>
            </li>
        </ul>
        {% else %}
        <ul class="dropdown-menu dropdown-user">
            <li><a href="/account/login"><i class="fa fa-sign fa-fw"></i>登陆</a>
            </li>
        </ul>

        {% endif %}
        <!-- /.dropdown-user -->
    </li>
    <!-- /.dropdown -->
</ul>
{% endblock %}